<layout name='PublishedRecipe' />
<div class="center">
    	<div class="dq_weizhi">Current position: Home >> recipes >> dish</div>
    	<div class="left">
        	<div class="Grilled">
                <div class="zuozhe">
                    <empty name="recipeinfo.userinfo.gravatar">
                        <img width="91" height="91" src="../Public/images/ren.jpg" />
                        <else/>
                        <img width="91" height="91" src="__PUBLIC__/Content/User/<{$recipeinfo.userinfo.gravatar}>" />
                    </empty>
                    <p class="chushimao" title="<{$recipeinfo.userinfo.exp}> integral">
                        <if condition="$recipeinfo['userinfo']['exp'] egt 1500">

                            <elseif condition="$recipeinfo['userinfo']['exp'] egt 800"/>
                            <img src="../Public/images/chushimao.jpg" />
                            <img src="../Public/images/chushimao.jpg" />
                            <img src="../Public/images/chushimao.jpg" />
                            <img src="../Public/images/chushimao.jpg" />
                            <img src="../Public/images/chushimao.jpg" />
                            <elseif condition="$recipeinfo['userinfo']['exp'] egt 300"/>
                            <img src="../Public/images/chushimao.jpg" />
                            <img src="../Public/images/chushimao.jpg" />
                            <img src="../Public/images/chushimao.jpg" />
                            <img src="../Public/images/chushimao.jpg" />
                            <elseif condition="$recipeinfo['userinfo']['exp'] egt 100"/>
                            <img src="../Public/images/chushimao.jpg" />
                            <img src="../Public/images/chushimao.jpg" />
                            <img src="../Public/images/chushimao.jpg" />
                            <elseif condition="$recipeinfo['userinfo']['exp'] egt 25"/>
                            <img src="../Public/images/chushimao.jpg" />
                            <img src="../Public/images/chushimao.jpg" />
                            <else />
                            <img src="../Public/images/chushimao.jpg" />
                        </if>
                    </p>
                </div>

                <div class="gr_right">
                    <h1><{$recipeinfo.name}></h1>
                    <p>Author: <{$recipeinfo.userinfo.username}> / <{$recipeinfo.created|date="m-d-Y",###}> / <{$recipeinfo.downloads}> have viewed</p>
                    <div class="fn">

                    	<p class="fo_pic">
                            <a href="#"><img src="../Public/images/tui.jpg" /></a>
                            <a href="#"><img src="../Public/images/face.jpg" /></a>
                        </p>

                        <p class="xx">
                            <for start="0" end="$levelavg">
                                <img src="../Public/images/huang_xx.jpg" />
                            </for>
                            <for start="$levelavg" end="5">
                                <img src="../Public/images/hui_xx.jpg" />
                            </for>
                            <span class="xt">
                                <em>
                                    <switch name="levelavg">
                                        <case value="0"><span class="delicious"></span></case>
                                        <case value="1"><span class="delicious">just so so</span></case>
                                        <case value="2"><span class="delicious">worth to try it</span></case>
                                        <case value="3"><span class="delicious">taste yummy</span></case>
                                        <case value="4"><span class="delicious">very delicious</span></case>
                                        <case value="5"><span class="delicious">fantastic</span></case>
                                    </switch>
                                </em>
                            </span>

                        <div style="clear:both;"></div>
                    </div>

                    <p class="print">
                        <eq name="Think.session.userrole" value='1'>
                                <span style="position: relative;left:-405px;">
                                    <a href="__APP__/Kitchen/edit/sid/<{$recipeinfo.recipetypeid}>/cid/<{$Think.get.cid}>/id/<{$Think.get.id}>">Edit</a>
                                </span>
                            <else/>

                            <notempty name="Think.session.userid">

                                <eq name="Think.session.userid" value="$recipeinfo.userinfo.id">
                                        <span style="position: relative;left:-405px;">
                                            <a href="__APP__/Kitchen/edit/sid/<{$recipeinfo.recipetypeid}>/cid/<{$Think.get.cid}>/id/<{$Think.get.id}>">Edit</a>
                                        </span>
                                </eq>

                            </notempty>
                        </eq>
                        <span class="em" style="margin-right: 20px;"><a href="javascript:print();;">Print</a></span>
                        <span class="em" style="margin-right: 20px;"><a href="#">Email</a></span>
                        <notempty name="Think.session.username">
                        <span><a id="favo" class="favo" href="__APP__/Kitchen/favourite/sid/<{$recipeinfo.recipetypeid}>/cid/<{$Think.get.cid}>/id/<{$Think.get.id}>">Add to My Favourite</a></span>
                        </notempty>
                    </p>

                    <p class="le_p"></p>
                </div>                
                <div style="clear:both;"></div>
            </div>
            
            <div class="pic_top">
            	<div class="ban_left">
                    <div class="banner_01">
                        <DIV id=YNews style="width:312px; height:312px;">
                            <notempty>
                                <IMG style="width:312px; height:312px;" src="__PUBLIC__/Content/KitchenArticle/Big_<{$recipeinfo.image}>">
                            </notempty>
                        </DIV>
                    </div>

                    <div class="method">

                        <ul>
                            <neq name="recipeinfo.setcookmethod.id" value="1">
                                <empty name="recipeinfo.setcookmethod">
                                    <li><strong>Cook method:</strong><{$recipeinfo.cookmethod}></li>
                                    <else/>
                                    <li><strong>Cook method:</strong><{$recipeinfo.setcookmethod.name}></li>
                                </empty>
                            </neq>

                            <neq name="recipeinfo.seteasyhard.id" value="1">
                                <empty name="recipeinfo.seteasyhard">
                                    <li><strong>Easy or hard:</strong><{$recipeinfo.easyorhard}></li>
                                    <else/>
                                    <li><strong>Easy or hard:</strong><{$recipeinfo.seteasyhard.name}></li>
                                </empty>
                            </neq>

                        </ul>
                    </div>

                </div>            
                
                <div style="clear:both;"></div>
            </div>

            <notempty name="recipeinfo.description">
                <div class="direc">
                    <h2 class="direc_h2">Brief description</h2>
                    <div style="margin-top:5px;white-space:normal; display:block;word-break:break-all;width:692px;">
                        <{$recipeinfo.description}>
                    </div>
                </div>
            </notempty>
            
            <div class="direc">
            	<h2 class="direc_h2">Directions</h2>
                <div style="margin-top:5px;white-space:normal; display:block;word-break:break-all;width:692px;">
                    <{$recipeinfo.details}>
                </div>
            </div>

            <notempty name="recipeinfo.technique">
                <div class="direc">
                    <h2 class="direc_h2">Tips</h2>
                    <div style="margin-top:5px;white-space:normal; display:block;word-break:break-all;width:692px;">
                        <{$recipeinfo.technique}>
                    </div>
                </div>
            </notempty>

            <div class="rate">
                <h2 class="all_h2">All the Rate & Comments</h2>
                <empty name="commentsinfo">
                    None
                    <else/>
                    <volist name="commentsinfo" id="vo">
                        <div class="rate_text">
                            <p class="p_01"><span class="ren"><{$vo.username|ucfirst}></span>
                                <for start="0" end="$vo.onlevel">
                                    <img src="../Public/images/all_xx.jpg" />
                                </for>
                            <span class="xt"><em>
                                <switch name="vo.onlevel">
                                    <case value="0">not good</case>
                                    <case value="1">just so so</case>
                                    <case value="2">worth to try it</case>
                                    <case value="3">taste yummy</case>
                                    <case value="4">very delicious</case>
                                    <case value="5">fantastic</case>
                                </switch>
                            </em>

                             <eq name="Think.session.userrole" value='1'>
                                 <a style="float: right;" href="__APP__/Kitchen/deletecomments/cid/<{$recipeinfo['recipecategoryid']}>/aid/<{$recipeinfo['id']}>/sid/<{$vo['id']}>">delete</a>
                                 <else/>
                                 <notempty name="Think.session.userid">
                                     <eq name="Think.session.userid" value="$recipeinfo.userinfo.id">
                                         <a style="float: right;" href="__APP__/Kitchen/deletecomments/cid/<{$recipeinfo['recipecategoryid']}>/aid/<{$recipeinfo['id']}>/sid/<{$vo['id']}>">delete</a>
                                     </eq>
                                 </notempty>
                             </eq>

                                    </span>
                            </p>
                            <p class="posted">Posted:<{$vo.created|date="m-d-Y",###}></p>
                            <p style="white-space:normal; display:block;word-break:break-all;"><{$vo.content}></p>
                        </div>
                    </volist>


                    <div style="clear:both;"></div>
                    <div class="fanye_box">
                        <div class="fanye_text">
                            <{$fpage}>
                        </div>
                        <div></div>
                        <div style="clear:both;"></div>
                    </div>
                </empty>

            </div>

            <div class="comment">
                <h2><span>
                    <empty name="Think.session.username">
                        anonymous
                        <else/>
                        <{$Think.session.username}>
                    </empty>

                </span>Rate and Comment</h2>
                <div class="my">
                    <p class="rating"><span class="my_rating">My Rating:</span>
                        <a href="javascript:;"><img class="onstart" title="just so so" src="../Public/images/rating_x.jpg" /></a>
                        <a href="javascript:;"><img class="onstart" title="worth to try it" src="../Public/images/rating_x.jpg" /></a>
                        <a href="javascript:;"><img class="onstart" title="taste yummy" src="../Public/images/rating_x.jpg" /></a>
                        <a href="javascript:;"><img class="onstart" title="very delicious" src="../Public/images/rating_x.jpg" /></a>
                        <a href="javascript:;"><img class="onstart" title="fantastic" src="../Public/images/rating_x.jpg" /></a>
                        <em>Click to  finish your rating</em>
                    </p>
                    <div style="clear:both;"></div>
                    <form action="__APP__/Kitchen/Comments" method="post" id="comments">
                        <input type="hidden" name="categoryid" value="<{$recipeinfo.recipecategoryid}>" />
                        <input type="hidden" name="articleid" value="<{$recipeinfo.id}>" />
                        <input type="hidden" name="username" value="<{$Think.session.username}>" />
                        <p class="My_Comment"><span class="my_rating">My Comment:</span> <span class="kuang_da">
                            <textarea name="content"></textarea>
                        </span></p>
                        <p class="remain">500 characters remain</p>
                        <input type="hidden" id="onlevel" name="onlevel" value="0" />
                        <p class="message-board-03"><input type="submit" value="post" id="button_01" /></p>
                        <empty name="Think.session.username">
                            <p class="message-board-04">
                                <input id="codes" name="code" type="text" style="width:70px;height:25px;position: relative;bottom: 6px;" />
                                <img id="clickcode" src="__APP__/Public/verify" />
                            </p>
                        </empty>

                    </form>
                    <div style="clear:both;"></div>
                </div>
            </div>
            
        </div>
        
        <div class="right">
            
       		<div class="make">
            	<h2>you may also like</h2>
                <ul>
                	<li><a href="#"><img src="../Public/images/make_01.jpg" /></a><p><a href="#">Apple</a></p></li>
                    <div style="clear:both;"></div>
                </ul>
            </div>       
        </div>
    </div>
